<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Hotels extends Model  {

	/**
	 * The database table used by the model.
	 *
	 * @var string
	 */
	protected $table = 'hotels';
	protected $primaryKey  ='hotels_id';

    /**
     * Indicates if the model should be timestamped.
     *
     * @var bool
     */
    public $timestamps = false;

    /**
     * Indicates if the primary key should be incrementing.
     *
     * @var bool
     */
    //protected $incrementing =false;

    /**
     * The storage format of the model's date columns.
     *
     * @var string
     */
    //protected $dateFormat = 'U';

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    //protected $fillable = ['name'];

    /**
     * The attributes that aren't mass assignable.
     *
     * @var array
     */
    //protected $guarded = ['price'];

    //use SoftDeletes;

    /**
     * The attributes that should be mutated to dates.
     *
     * @var array
     */
    //protected $dates = ['deleted_at'];

	public function store()
	{
		return $this->belongsTo('App\Models\Store','store_id','store_id');
	}

	public function phystore()
	{
		return $this->belongsTo('App\Models\PhyStore','phy_store_id','phy_store_id');
	}

	public function albums(){
		return $this->hasMany('App\Models\HotelsImage','hotels_id','hotels_id');
	}

	public function statics(){
		return $this->hasOne('App\Models\HotelsStatistics','hotels_id','hotels_id');
	}

}
